<?php
/**
 * 物料模型
 * User: ws
 * Date: 2018/8/6
 * Time: 19:30
 */

namespace app\admin\model;
use think\Model;

class Materiel extends Model
{

    function add($params){
        $result = $this->isUpdate(false)->allowField(true)->save($params);
        if($result){
            return 1;
        }else{
            return false;
        }
    }

    function edit($params){
        $result = $this->isUpdate(true)->allowField(true)->save($params);
        if($result){
            return true;
        }else{
            return false;
        }
    }

}